#!/bin/bash

logs_path="/data/prj/log/"
log_receiver_name="uwsgi9102.log"
log_viewer_name="uwsgi9103.log"
log_receiver_new="${log_receiver_name}_`date +%Y%m%d_%H%M`.log"
log_viewer_new="${log_viewer_name}_`date +%Y%m%d_%H%M`.log"

sudo mv ${logs_path}${log_receiver_name} ${logs_path}${log_receiver_new}
sudo mv ${logs_path}${log_viewer_name} ${logs_path}${log_viewer_new}

sudo service uwsgi9102 reload
sudo service uwsgi9103 reload

sudo gzip ${logs_path}${log_receiver_new}
sudo gzip ${logs_path}${log_viewer_new}
